// -----------------------------------------------------------------------
//  <copyright file="AuthorizationModule.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2024 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://www.dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2024-03-06 9:42</last-date>
// -----------------------------------------------------------------------

using System.ComponentModel;

using DaprPlus.Authorization;
using DaprPlus.Authorization.OpenIddict;
using DaprPlus.Identity.Domain.Entities;


namespace DaprPlus.Identity.Infrastructure.Authorization;

[Description("Identity Authorization Module")]
public class AuthorizationModule : AuthorizationModuleBase<Role>
{
    /// <summary>
    /// 将模块服务添加到依赖注入服务容器中
    /// </summary>
    /// <param name="services">依赖注入服务容器</param>
    /// <returns></returns>
    public override IServiceCollection AddServices(IServiceCollection services)
    {
        services.AddCacheRepository<Role>();

        return base.AddServices(services);
    }
}
